﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Windows.Forms;

namespace PrgMonitor
{
	static class Program
	{
		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		static void Main(string[] args)
		{
			if (args.Count() == 0)
			{
				ServiceBase[] ServicesToRun;
				ServicesToRun = new ServiceBase[] 
				{ 
					new PrgMonitorService() 
				};
				ServiceBase.Run(ServicesToRun);
			}
			else
			{
				Application.EnableVisualStyles();
				Application.SetCompatibleTextRenderingDefault(false);
				Form newForm = new UIFormNotify();
				Application.Run(newForm);
			}
		}
	}
}
